#include <bits/stdc++.h>
#include <bits/extc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;
using namespace __gnu_pbds;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 75;
const int mod = 998244353;

int a[N], n, p[N * 810], S, tV;
gp_hash_table < int, int > f[N][N], g[N][N];
void upd(int &x) { x = x + (x >> 31 & mod); }

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in, tV = in; rep(i, 1, n) a[i] = in, S += a[i];
	sort(a + 1, a + n + 1);
	f[0][0][0] = 1;
	rep(i, 1, n) {
		per(j, i - 1, 0) {
			f[i][j] = f[i - 1][j];
			for(auto v : f[i - 1][j]) 
				upd(f[i][j + 1][v.fi + a[i]] += v.se - mod);
		}
	}
	g[n + 1][0][0] = 1;
	per(i, n, 1) {
		per(j, n - i, 0) {
			g[i][j] = g[i + 1][j];
			for(auto v : g[i + 1][j])
				upd(g[i][j + 1][v.fi + a[i]] += v.se - mod);
		}
	}
	int ans = 0;
	rep(i, 2, n - 1) {
		rep(j, 1, min(i - 1, n - i)) {
			rep(k, 0, S) p[k] = 0;
			for(auto v : f[i - 1][j]) upd(p[v.fi] += v.se - mod);
			rep(k, 1, S) upd(p[k] += p[k - 1] - mod);
			int tot = j * 2 * a[i] - 1;
			for(auto v : g[i + 1][j]) 
				if(v.fi <= tot) upd(ans += 1ll * p[tot - v.fi <= S ? tot - v.fi : S] * v.se % mod - mod);
		}
	} printf("%d\n", ans);
	return 0;
}
